FROM openjdk:8u342-jdk
ARG JAR_FILE=target/*.jar
COPY ${JAR_FILE} app.jar

RUN mkdir /surveyking

ENV PORT 1991
ENV URL "jdbc:mysql://localhost:3307/surveyking"
ENV PWD = "123456"

VOLUME /files
VOLUME /logs

EXPOSE 1991
ENTRYPOINT ["sh", "-c", "java ${JAVA_OPTS} -jar /app.jar --server.port=${PORT} --spring.datasource.url=${URL} --spring.datasource.username=root --spring.datasource.password=${PWD}"]


